package com.beans.user;


import com.sql.DBFactory;
import java.sql.*;

public class GroupDetail {



	    private int ID;
	    private String GroupNo;
	    private String GroupName;
	    private String Memo;
	    private Connection conn=null;
	    private Statement stmt=null;
	    private ResultSet rs=null;
		private String sql=null;

	    public void setGroupInfo(String GroupNo)
	    {
	        sql = "select * from admingroup where group_no='" + GroupNo + "'";
	        try
	        {
	            conn = DBFactory.getConnection();
	            stmt = conn.createStatement();
	            rs = stmt.executeQuery(sql);
	            if(rs.next())
	            {
	                ID = rs.getInt(1);
	                GroupNo = rs.getString(4);
	                GroupName = rs.getString(2);
	                Memo = rs.getString(3);
	            }
	        }
	        catch(Exception e)
	        {
	            e.printStackTrace();
	        }
	        finally
	        {
	            try
	            {
	                rs.close();
	                stmt.close();
	                conn.close();
	            }
	            catch(SQLException sqlex)
	            {
	            }
			}
		}

		public int getID()
	    {
	        return ID;
	    }

	    public String getGroupNo()
	    {
	        return GroupNo;
	    }

	    public String getGroupName()
	    {
	        return GroupName;
	    }

	    public String getMemo()
	    {
	        return Memo;
	    }
	}
